package design.onekey.service;

import com.baomidou.mybatisplus.extension.service.IService;
import design.onekey.base.BaseEntity;
import design.onekey.base.PageEntity;
import design.onekey.model.dto.UserInfoDto;
import design.onekey.model.UserAccount;
import design.onekey.model.dto.UserAccountDto;
import design.onekey.model.dto.UserWithOrgRoleDto;

import java.util.List;

/**
* @Description: UserAccount服务接口
* @author
* @date 2020-06-05 04:03:19
* @version V1.0
*/
public interface IUserAccountService extends IService<UserAccount> ,GenericService<UserAccount>{

   /**
   * @Title: tablePagingQuery
   * @Description: 表格分页查询
   * @param @param model
   * @return BaseEntity
   * @throws
   */
   PageEntity tablePagingQuery(UserAccount model);

   /**
   *<p>Title: getDetail</p>
   *<p>Description: 获取详情</p>
   * @author blcloak
   * @param id
   * @return
   */
   BaseEntity getDetail(Long id);

   /**
   *<p>Title: insert</p>
   *<p>Description: 新增数据</p>
   * @author blcloak
   * @param model
   * @return
   */
   BaseEntity insert(UserWithOrgRoleDto model, UserInfoDto userInfoDto);

   /**
   *<p>Title: update</p>
   *<p>Description: 更新数据</p>
   * @author blcloak
   * @param model
   */
   BaseEntity update(UserWithOrgRoleDto model, UserInfoDto userInfoDto);

   /**
   *<p>Title: delete</p>
   *<p>Description: 单条删除数据</p>
   * @author blcloak
   * @param model
   * @return
   */
   BaseEntity delete(Long id);

   /**
   *<p>Title: deleteBatch</p>
   *<p>Description: 批量删除数据</p>
   * @author blcloak
   * @param list
   * @return
   */
   BaseEntity deleteBatch(List<Long> ids);

    /**
     * @Method tablePagingQueryByAuthority
     * @Author zhangcheng
     * @Version  1.0
     * @Description 根据用户权限查询用户列表
     * @Return
     * @Exception
     * @Date 2020-6-10 11:35
     */
    BaseEntity tablePagingQueryByAuthority(UserAccount model, UserInfoDto userInfoDto);

    /**
     * @Method resetPwd
     * @Author zhangcheng
     * @Version  1.0
     * @Description 根据用户id重置密码
     * @Return com.baiyyy.yfz.base.BaseEntity
     * @Exception
     * @Date 2020-6-12 9:18
     */
    BaseEntity resetPwd(Long id);

    /**
    * @Title: changePwd
    * @Description: 修改密码
    * @param userAccountDto
    * @param userInfoDto
    * @return
    * @author blcloak
    * @date 2020-06-12 01:31:09
    */
   BaseEntity changePwd(UserAccountDto userAccountDto, UserInfoDto userInfoDto);

   /**
    * @Title: updateStatus
    * @Description: 启用停用
    * @param userAccount
    * @return
    * @author blcloak
    * @date 2020-06-23 07:44:28
    */
   BaseEntity updateStatus(UserAccount userAccount);
}
